import request from '@/utils/request'

// 查询对账批次列表
export function listBatch(query) {
  return request({
    url: '/finance/batch/list',
    method: 'get',
    params: query
  })
}

// 差错处理
export function processCheckDifResult(form) {
  return request({
    url: '/finance/detail/processCheckDifResult',
    method: 'get',
    params: form
  })
}

// 查询字典数据
export function dictInfo() {
  return request({
    url: '/finance/batch/getDict',
    method: 'get'
  })
}



// 查询对账批次详情
export function batchInfo(checkBatchForm) {
  return request({
    url: '/finance/batch/showBatch',
    method: 'get',
    params: checkBatchForm
  })
}
// 对账确认
export function moneyInfo(checkBatchForm) {
  return request({
    url: '/finance/batch/moneyForSure',
    method: 'post',
    data: checkBatchForm
  })
}
// 重新对账
export function forShureInfo(checkBatchForm) {
  return request({
    url: '/finance/batch/forSure',
    method: 'post',
    data: checkBatchForm
  })
}

// 获取是否完成对账集合
export function getCompleteStateList() {
  return request({
    url: '/finance/batch/getCompleteStateList',
    method: 'get'
  })
}
// 获取生成方式
export function getBillTypeList() {
  return request({
    url: '/finance/batch/getBillTypeList',
    method: 'get'
  })
}
// 获取账单类型
export function getCreateTypeList() {
  return request({
    url: '/finance/batch/getCreateTypeList',
    method: 'get'
  })
}

// 查询对账批次详细
export function getBatch(id) {
  return request({
    url: '/finance/batch/' + id,
    method: 'get'
  })
}

// 新增对账批次
export function addBatch(data) {
  return request({
    url: '/finance/batch',
    method: 'post',
    data: data
  })
}

// 修改对账批次
export function updateBatch(data) {
  return request({
    url: '/finance/batch',
    method: 'put',
    data: data
  })
}

// 删除对账批次
export function delBatch(id) {
  return request({
    url: '/finance/batch/' + id,
    method: 'delete'
  })
}
